import React, { Component } from 'react'
import Comment from './Comment'
export default class CommentList extends Component {
    // state = {
    //     data: [
    //         { name: '张三', content: '吃饭' },
    //         { name: '李四', content: '睡觉' },
    //         { name: '王五', content: '打豆豆' },
    //     ]
    // }
    render() {
        // const { data } = this.state
        return (
            <div>

                {this.props.comments.map((item, index) => {
                    return (
                        <Comment comment={item} key={index} />
                    )

                })}
            </div>
        )
    }
}
